<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>为 w32api_functions 函数定一个类型</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.w32api.html">W32api 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.w32api-init-dtype.html">w32api_init_dtype</a></div>
 <div class="up"><a href="ref.w32api.html">W32api 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.w32api-deftype" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">w32api_deftype</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.2.0)</p><p class="refpurpose"><span class="refname">w32api_deftype</span> &mdash; <span class="dc-title">为 w32api_functions 函数定一个类型</span></p>

   </div>
 <div class="refsect1 description" id="refsect1-function.w32api-deftype-description">
  <h3 class="title">说明</h3>
    <div class="methodsynopsis dc-description">
     <span class="type">bool</span> <span class="methodname"><strong>w32api_deftype</strong></span>
      ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$typename</code></span>
     , <span class="methodparam"><span class="type">string</span> <code class="parameter">$member1_type</code></span>
     , <span class="methodparam"><span class="type">string</span> <code class="parameter">$member1_name</code></span>
     [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$...</code></span>
     [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$...</code></span>
    ]] )</div>

    <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>
    <p class="para">
     如果你希望为 win32api 调用定义一个类型，那么你就需要调用
     <span class="function"><strong>w32api_deftype()</strong></span>函数。这个函数使得到 2n+1 个参数，n
     代表该类型有多少个成员。第一个参数是这个类型的名称。在这之后的是这各类型成员的名称（成对出现）。所有的类型名称大小写敏感。内建的类型名称应该使用小写。
     成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
    </p>
   </div>


 <div class="refsect1 parameters" id="refsect1-function.w32api-deftype-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">typename</code></em></dt>

     <dd>

      <p class="para">
       The name of the type.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">member1_type</code></em></dt>

     <dd>

      <p class="para">
       A member type can be a user defined type. All the type names are case
       sensitive. Built in type names should be provided in lowercase.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">member1_name</code></em></dt>

     <dd>

      <p class="para">
       The member name of <em><code class="parameter">member1_type</code></em>.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">...</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">...</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
   </dl>

  </p>
  <p class="para">
   This function takes 2n+1 arguments, where n is the number of members the
   type has. After that is the type of the member followed by the members
   name (in pairs). 
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.w32api-deftype-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.w32api-deftype-notes">
  <h3 class="title">注释</h3>
  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>
 </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.w32api.html">W32api 函数</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.w32api-init-dtype.html">w32api_init_dtype</a></div>
 <div class="up"><a href="ref.w32api.html">W32api 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
